package com.itheima.stock.mapper;

import com.itheima.stock.pojo.domain.StockExternalDomain;
import com.itheima.stock.pojo.entity.StockOuterMarketIndexInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * 外盘详情信息表 Mapper 接口
 * </p>
 *
 * @author 哈纳桑
 * @since 2024-06-02
 */
public interface StockOuterMarketIndexInfoMapper extends BaseMapper<StockOuterMarketIndexInfo> {

    /**
     * 查询当前时间下最新外盘信息 （前4条）
     * @param curTime
     * @return
     */
    List<StockExternalDomain> getStockExternalInfo(Date curTime);

    /**
     * 批量保存外盘信息
     * @param list
     * @return
     */
    boolean saveBatch(@Param("list") List list);
}
